package com.sand.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "contract", schema = "ssh_pro", catalog = "")
public class ContractEntity {
    /**
     * @author <achao1441470436@gmail.com>
     * @since 2021/11/28/028 14:46
     */
    private int rid;
    private int orderId;
    private int status;
    private Timestamp contractDate;
    private String content;
    private String confirm;

    @Id
    @Column(name = "rid")
    public int getRid() {
        return rid;
    }

    public void setRid(int rid) {
        this.rid = rid;
    }

    @Basic
    @Column(name = "orderId")
    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    @Basic
    @Column(name = "status")
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Basic
    @Column(name = "contractDate")
    public Timestamp getContractDate() {
        return contractDate;
    }

    public void setContractDate(Timestamp contractDate) {
        this.contractDate = contractDate;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "confirm")
    public String getConfirm() {
        return confirm;
    }

    public void setConfirm(String confirm) {
        this.confirm = confirm;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ContractEntity that = (ContractEntity) o;
        return rid == that.rid && orderId == that.orderId && Objects.equals(status, that.status) && Objects.equals(contractDate, that.contractDate) && Objects.equals(content, that.content) && Objects.equals(confirm, that.confirm);
    }

    @Override
    public int hashCode() {
        return Objects.hash(rid, orderId, status, contractDate, content, confirm);
    }
}
